package com.ruoyi.warning.service;


import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.hik.EncodeDevice;
import com.ruoyi.common.hik.Events;
import com.ruoyi.warning.domain.entity.Area;
import com.ruoyi.warning.domain.entity.Device;
import com.ruoyi.warning.domain.entity.Event;
import org.bytedeco.javacv.FFmpegFrameGrabber;

import java.io.UnsupportedEncodingException;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 海康监控的服务类
 * </p>
 *
 * @author chenhc
 * @since 2025-02-06
 */
public interface HikApiService {
    Map<String, EncodeDevice> encodeDeviceSearch();

    List<Device> cameraList();

    List<Device> cameraSearch(JSONObject jsonBody);

    void getRoot();

    List<Events> searchEvents(String startTime, String endTime, String pageSize, String pageNo) throws UnsupportedEncodingException;

    String picture(String svrIndexCode,String picUri);

    Event playbackURLs(String cameraIndexCode, String beginTime, String endTime);

    String previewURLs(String code);

    List<Area> nodesByParams();

    Map<String, String> getCameraOnline(String[] ids);

    List<Device> cameraList(JSONObject jsonBody);

    void saveRtspToMp4(Event event, String outputPath, LocalDateTime startTime, LocalDateTime endTime) throws FFmpegFrameGrabber.Exception, Exception;
}
